package work.timejay.user.service.books;

import org.springframework.web.multipart.MultipartFile;
import work.timejay.common.ApiPageEntity;
import work.timejay.user.bo.BooksFindBO;
import work.timejay.user.dto.books.UserBookSaveDTO;
import work.timejay.user.dto.books.UserBooksPageDTO;
import work.timejay.user.entity.books.UserBooks;
import work.timejay.common.SuperService;
import work.timejay.user.vo.books.UserBooksPageVO;

/**
 * <p>
 * 用户书本表 服务类
 * </p>
 *
 * @author 王文杰
 * @since 2023-11-29
 */
public interface UserBooksService extends SuperService<UserBooks> {

    /**
     * 根据bookId查询 点赞，阅读相关数据
     * @param bookId
     * @return
     */
    BooksFindBO findBookOneDayReadNumById(Long bookId);

    /**
     * 添加用户book
     * @param dto
     */
    void saveBook(UserBookSaveDTO dto);

    /**
     * 用户书籍分页接口
     * @param dto
     * @return
     */
    ApiPageEntity<UserBooksPageVO> userBooksPage(UserBooksPageDTO<UserBooks> dto);

    /**
     * 用户上传书籍
     * @param file
     */
    void uploadBooks(MultipartFile file);
}
